#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
int main()
{
	int x, y, a, b, where, fire;
	x = 1;
	y = 2;
	where = 2;
	fire = 0;
	char input;
	while (1)
	{
		system("cls");
		printf("X:%d | Y:%d | 方向状态:%d | 火力状态:%d\n", x, y, where, fire);
		for (b = 0; b <= 21; b++)
		{
			for (a = 0; a <= 38 ; a++)
			{
				if ((x-1)==a && (y-1)==b)
				{
					printf("♀");
				}
				else
				{
					printf(" .");
				}
			}
			printf("\n");
		}
		input = _getch();
		if (input == 'w')
		{
			y--;
			if (y < 1)
			{
				y = 1;
			}
		}
		else
		{
			if (input == 's')
			{
				y++;
				if (y > 22)
				{
					y = 22;
				}
			}
			else
			{
				if (input == 'a')
				{
					x--;
					if (x < 1)
					{
						x = 1;
					}
				}
				else
				{
					if (input == 'd')
					{
						x++;
						if (x > 39)
						{
							x = 39;
						}
					}
				}
			}
		}
	}
}